package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * 发布车位租赁
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_park_space_publish")
public class ParkSpacePublish extends Model<ParkSpacePublish> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "publish_id", type = IdType.ASSIGN_ID)
    private String publishId;
    /**
     * 标题
     */
    @TableField("title")
    private String title;
    /**
     * 租赁开始时间
     */
    @TableField("start_date")
    private LocalDate startDate;
    /**
     * 租赁结束时间
     */
    @TableField("end_date")
    private LocalDate endDate;
    /**
     * 租赁开始小时
     */
    @TableField("start_hour")
    private LocalTime startHour;
    /**
     * 租赁结束小时
     */
    @TableField("end_hour")
    private LocalTime endHour;
    /**
     * 租赁天数:租赁天数、小时数
     */
    @TableField("days")
    private Long days;
    /**
     * 发布时间
     */
    @TableField("publish_time")
    private LocalDateTime publishTime;
    /**
     * 备注
     */
    @TableField("note")
    private String note;
    /**
     * 停车场
     */
    @TableField("park_id")
    private String parkId;
    /**
     * 车位类型
     */
    @TableField("park_space_type")
    private String parkSpaceType;
    /**
     * 是否启用
     */
    @TableField("enable")
    private String enable;
    /**
     * 租赁类型
     */
    @TableField("lease_type")
    private String leaseType;
    /**
     * 循环发布
     */
    @TableField("loop_publish")
    private String loopPublish;
    /**
     * 操作人
     */
    @TableField("operator")
    private String operator;
    /**
     * 机构ID
     */
    @TableField("org_id")
    private String orgId;

    public void freeData() {
        this.publishId = null;
        this.title = null;
        this.startDate = null;
        this.endDate = null;
        this.startHour = null;
        this.endHour = null;
        this.days = null;
        this.publishTime = null;
        this.note = null;
        this.parkId = null;
        this.parkSpaceType = null;
        this.enable = null;
        this.leaseType = null;
        this.loopPublish = null;
        this.operator = null;
        this.orgId = null;
    }

}
